@import "base";

@f-bg-color: #222;
@f-font-color: #ddd;
@f-bd-color: #080808;
@f-hf-index: 128;
@f-header-height: 50px;
@f-footer-height: 35px;
@f-menu-hover-bg-color: #428bca;
@f-logo-width: 230px;
@f-logo-height: 35px;
@f-left-nav-width: 230px;
@f-content-min-height: 325px;

.full() {
  height: 100%;
  min-height: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
}

ul, li {
  margin: 0;
  padding: 0;
  list-style: none;
}

html, body, .d-left-nav {
  background-color: #222;
  font: 12px/16px "Microsoft YaHei", Verdana, Arial;
  .full();
}

header, footer {
  background-color: @f-bg-color;
  color: @f-font-color;
  position: relative;
  z-index: @f-hf-index;
}

header {
  height: @f-header-height;
  border-color: @f-bd-color;
  .d-logo {
    position: absolute;
    padding-left: 15px;
    top: (@f-header-height - @f-logo-height)/2;
    height: @f-logo-height;
    width: @f-logo-width;
    overflow: hidden;
  }
  .d-global-search {
    display: inline-block;
    line-height: @f-header-height;
    height: @f-header-height;
    margin-left: @f-logo-width;
    position: relative;
    i {
      left: 6px;
      position: absolute;
      top: 21px;
      color: @gray-dark;
    }
    input {
      background: rgba(255, 255, 255, 0.75) none repeat scroll 0 0;
      border: 1px solid #555;
      border-radius: 3px;
      color: #555;
      font-size: 12px;
      height: 32px;
      margin: 0;
      outline: 0 none;
      padding: 5px 5px 5px 25px;
      vertical-align: middle;
      width: 305px;
      z-index: 3;
      &:focus {
        background: rgba(255, 255, 255, 1) none repeat scroll 0 0;
      }
    }
  }
  .d-top-nav {
    float: right;
    padding-right: 20px;
    li {
      float: left;
      position: relative;
      line-height: @f-header-height;
      height: @f-header-height;
      cursor: pointer;
      &.hover {
        color: @color-default;
        .dropdown-menu {
          display: block;
        }
      }
      .d-text-avatar {
        display: inline-block;
        font-size: 16px;
        height: 35px;
        line-height: 35px;
        margin: 0;
        width: 35px;
      }
      .dropdown-menu {
        background-clip: padding-box;
        background-color: @color-default;
        border: 1px solid rgba(0, 0, 0, 0.15);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176);
        display: none;
        float: left;
        font-size: 14px;
        list-style: outside none none;
        margin: 2px 0 0;
        padding: 5px 0;
        position: absolute;
        top: 100%;
        max-width: 400px;
        min-width: 240px;
        z-index: 1000;
        left: auto;
        right: -5px;
        border-radius: 0 0 4px 4px;
        .dropdown-header {
          background-color: #f9f9f7;
          padding: 9px 15px;
          position: relative;
          font-size: 14px;
          border-bottom: 1px solid #e1e1e1;
          h3 {
            margin: 0;
            font-size: 16px;
            font-weight: 500;
            color: @f-bg-color;
            padding-left: 23px;
          }
          .j-close {
            position: absolute;
            right: 12px;
            top: 8px;
          }
        }
        .dropdown-group {
          border-bottom: 1px solid #e1e1e1;
          li {
            float: none;
            line-height: 38px;
            height: 38px;
            margin: 5px;
            a {
              color: #333;
              cursor: pointer;
              display: block;
              padding: 5px 15px;
              line-height: 150%;
              .rounded-corners(2px);
              i {
                margin-right: 5px;
              }
              &:hover {
                background: #e7e7df none repeat scroll 0 0;
                color: #d84c31;
                text-decoration: none;
              }
            }
          }
        }
        .dropdown-footer {
          background: #f9f9f7 none repeat scroll 0 0;
          line-height: 32px;
          padding: 5px 15px;
          text-align: right;
          width: 300px;
        }
      }
    }
  }
}

.d-container {
  background-color: @color-default;
  margin-top: 0-@f-header-height;
  padding-bottom: @f-footer-height;
  min-height: 100%;
  position: relative;
  z-index: 12;
  .d-container-wrap {
    padding-top: @f-header-height;
    color: @f-font-color;
  }
  .d-left-nav {
    background-color: @f-bg-color;
    .full();
    left: 0;
    position: absolute;
    top: 0;
    width: @f-left-nav-width;
  }
  .d-page-content {
    margin-left: @f-left-nav-width;
    min-height: @f-content-min-height;
    padding: 0 20px;
  }
  .page-title {
    color: #666;
    display: block;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -1px;
    margin: 20px 0 15px;
    padding: 0;
    small {
      color: #888;
      font-size: 14px;
      font-weight: 300;
      letter-spacing: 0;
      margin-left: 15px;
    }
  }
}

footer {
  height: @f-footer-height;
  line-height: @f-footer-height;
  padding-right: 15px;
  text-align: right;
  margin-top: 0-@f-footer-height;
  border: none;
  a {
    color: @f-font-color;
    text-decoration: none;
  }
}

//text-avatar
@avatar-bg-color: #e7e7df;
@avatar-bd-color: #ccc;
@avatar-color: #d84c31;
@avatar-radius-size: 3px;
@avatar-font-size-small: 22px;
@avatar-font-size: 28px;
@avatar-font-size-large: 36px;
@avatar-size-small: 50px;
@avatar-size: 100px;
@avatar-size-large: 150px;

/*text-avatar*/
.d-text-avatar {
  background-color: @avatar-bg-color;
  border: 1px solid @avatar-bd-color;
  .rounded-corners(@avatar-radius-size);
  color: @avatar-color;
  font-size: @avatar-font-size;
  height: @avatar-size;
  width: @avatar-size;
  line-height: @avatar-size;
  overflow: hidden;
  text-align: center;
  vertical-align: middle;
  padding: 0 15px;
  text-overflow: ellipsis;
  text-decoration: none;
}

.d-text-avatar-small {
  .rounded-corners(@avatar-radius-size*.8);
  font-size: @avatar-font-size-small;
  height: @avatar-size-small;
  width: @avatar-size-small;
  line-height: @avatar-size-small;
  padding: 0 5px;
}

.d-text-avatar-large {
  .rounded-corners(@avatar-radius-size*1.2);
  font-size: @avatar-font-size-large;
  height: @avatar-size-large;
  width: @avatar-size-large;
  line-height: @avatar-size-large;
  padding: 0 25px;
}

.d-text-avatar-round {
  .rounded-corners(50%);
}